﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    /// <summary>
    /// 
    /// </summary>
    public class ModelBase : ObservableObject, ICloneable
    {
        /// <summary>
        /// 
        /// </summary>
        public ModelBase()
        {

        }

        public object Clone()
        {
            return this.MemberwiseClone();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public T Clone<T>() where T : class, new()
        {
            return this.MemberwiseClone() as T;
        }

        /// <summary>
        /// 验证Model是否符合要求
        /// </summary>
        /// <returns></returns>
        public virtual bool Validate()
        {
            return false;
        }
    }
}
